package com.thinkin.ordercenter.buz;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.thinkin.jdbc.util.RandomUUID;
import com.thinkin.ordercenter.dao.CreRootDao;
import com.thinkin.ordercenter.dao.impl.CreRootDaoImpl;
import com.thinkin.ordercenter.po.CreRoot;

public class CreRootBuz {
	Logger logger = LoggerFactory.getLogger(CreRootBuz.class);
	private CreRootDao creRootDao;

	public CreRootBuz() {
		creRootDao = new CreRootDaoImpl();
	}

	public void add(CreRoot creRoot) {
		String sql = "insert into cre_root values(?,?,?,?)";
		Object param[] = { creRoot.getId(), creRoot.getCodeNo(),
				creRoot.getNname(), creRoot.getRegSign()

		};

		creRootDao.add(sql, param, true);
	}

	public static void main(String[] args) {
		CreRootBuz creRootBuz = new CreRootBuz();
		CreRoot creRoot = new CreRoot();
		creRoot.setId(new RandomUUID().uuid);
		creRoot.setCodeNo("test");
		creRoot.setNname("test1");
		creRoot.setRegSign("1111111111");
		creRootBuz.add(creRoot);

	}
}
